package cn.touna.jss.common.enums;

/**
 * @program: data-cloud-jss
 * @description: 接口归类枚举
 * @Author: wuwc
 * @Date: 2019-03-04 17:06
 * @Version:1.0
 **/
public enum  IntfScopeEnum {

    JSS_INTF_TEST("0","测试"),
    JSS_INTF_THIRD("1","三方"),
    JSS_INTF_SYSTEM("2","系统");

    private String code;
    private String desc;

    private IntfScopeEnum(String code,String desc){
        this.code=code;
        this.desc=desc;
    }

    /**
     * 获取名称
     * @param code 编号
     * @return 名称
     */
    public static String getDescByCode(String code) {
        for (IntfScopeEnum intfScope : IntfScopeEnum.values()) {
            if (intfScope.getCode().equals(code)) {
                return intfScope.desc;
            }
        }
        return null;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public boolean equals(String code){
        return this.code.equals(code);
    }
}


